package com.suixinsanren.design.factory.study.soulation02;

/**
 @author zhangxiang
 @create 2021-03-17-12:51:12
 **/
public class NYPizzaStore extends PizzaStore {

    @Override
    public Pizza createPizza(String type) {
        Pizza pizza = null;
        switch (type) {
            case "cheese":
                pizza = new CheesePizza();
                break;
            case "pepperoni":
                pizza = new PepperoniPizza();
                break;
            case "veggie":
                pizza = new VeggiePizza();
        }
        return pizza;
    }
}
